﻿@model BrnMall.Web.MallAdmin.Models.AttributeListModel

@section header{
    <title>属性列表</title>
    <link type="text/css" rel="stylesheet" href="/admin_mall/content/css/site.css"/>
    <script type="text/javascript" src="/admin_mall/scripts/jquery.js"></script>
    <script type="text/javascript" src="/admin_mall/scripts/showlist.js"></script>
}

@section body{
<h1 class="rightH1">
属性管理 &gt;&gt; 属性列表
<div class="right">
<a href="@Url.Action("categorylist")" class="menuBT"><img src="/admin_mall/content/images/goback.jpg"/>返回分类</a>
<a href="@Url.Action("addattribute", new { cateId = Model.CateId })" class="menuBT"><img src="/admin_mall/content/images/add.jpg"/>添加属性</a>
<div class="clear"></div>
</div>
<div class="clear"></div>
</h1>
    
    @using (Html.BeginForm("attributelist", "category"))
    {
    
    <input type="hidden" value="@Model.CateId" id="CateId" name="CateId" />
    <input type="hidden" value="@Model.SortColumn" id="sortColumn" name="sortColumn" />
    <input type="hidden" value="@Model.SortDirection" id="sortDirection" name="sortDirection" />
        <div class="table_top"></div>
<div class="dataList">
<table width="100%">
<thead>
  <tr>
    <th width="10" align="center"></th>
    <th width="74" align="left" name="sortTitle" column="attrid" direction="DESC">编号</th>
    <th align="left" name="sortTitle" column="name" direction="DESC">属性名称</th>
    <th width="200" align="left" name="sortTitle" column="attrgroupid" direction="DESC">属性分组</th>
    <th width="100" align="left" name="sortTitle" column="showtype" direction="DESC">展示类型</th>
    <th width="100" align="left" name="sortTitle" column="isfilter" direction="DESC">筛选属性</th>
    <th width="100" align="left" name="sortTitle" column="displayorder" direction="ASC">排序</th>  
    <th width="146" align="left">管理操作</th>
    </tr>
</thead>
  <tbody>
  @foreach (DataRow row in Model.AttributeList.Rows)
  {
  <tr>
    <td align="center"></td>
    <td>@row["attrid"]</td>
    <td>@row["name"]</td>
    <td>@row["attrgroupname"]</td>
        <td>
                    @{
      if (row["showtype"].ToString() == "0")
      { 
      @:文字
      }
      else
      { 
            @:图片
      } 
        }
    </td>
        <td>
                    @{
      if (row["isfilter"].ToString() == "0")
      { 
      @:否
      }
      else
      { 
            @:是
      } 
        }
    </td>
    <td>@row["displayorder"]</td>
    <td>
        @Html.ActionLink("[值列表]", "attributevaluelist", new { attrId = row["attrid"] }, new { @class = "editOperate" })|
        @Html.ActionLink("[编辑]", "editattribute", new { attrId = row["attrid"] }, new { @class = "editOperate" })| 
        @Html.ActionLink("[删除]", "delattribute", new { attrId = row["attrid"] }, new { @class = "deleteOperate" })
    </td>
    </tr>
  }
</tbody>
</table>
</div>
        }
    <div class="table_bottom"></div>

}